adTempus API
ArcanaDevelopment.adTempus.Client.Collections Namespace / ADTObjectCollectionT<T> Class / UpdateFrom Method / UpdateFrom(IEnumerable,Boolean) Method
An enumerable collection to add from
If true, the method throws an InvalidOperationException if it encounters an item that is not of type T. If false, invalid items are silently ignored.


In This Topic
    UpdateFrom(IEnumerable,Boolean) Method
    In This Topic
    Updates the collection to match the specified source by adding, deleting, and reordering contents as needed.
    Syntax
    'Declaration
     
    
    Public Overloads Overridable Sub UpdateFrom( _
       ByVal source As IEnumerable, _
       ByVal throwOnMismatch As Boolean _
    ) 
    public virtual void UpdateFrom( 
       IEnumerable source,
       bool throwOnMismatch
    )
    public:
    virtual void UpdateFrom( 
       IEnumerable^ source,
       bool throwOnMismatch
    ) 

    Parameters

    source
    An enumerable collection to add from
    throwOnMismatch
    If true, the method throws an InvalidOperationException if it encounters an item that is not of type T. If false, invalid items are silently ignored.
    Remarks

    This method behaves differently from AddRange (which only adds to an existing collection). It makes the contents of the target collection match the contents of the source collection by adding and removing objects as necessary.

    See Also